      SUBROUTINE EXPN(T,TLAST,T1,VLAST,V1,SSN,TCOR,OUT)
C
      IMPLICIT REAL*8(A-H,O-Z)
C
      COMMON/ICSADM/L,IRAND,NCHAN
C
      REAL*4 GAS,ONE,ZERO
      DATA ONE/1.0E0/,ZERO/0.0E0/
C
      DIMENSION VLAST(1),V1(1),SSN(1),TCOR(1),OUT(1)
C
      DO 50 I=1,NCHAN
      OUT(I)=VLAST(I)
      IF(T.EQ.TLAST) GO TO 50
      IF(T.LT.TLAST) GO TO 10
      DEL=T-TLAST
      V=VLAST(I)
      IF(L.EQ.2) GO TO 30
      V1(I)=VLAST(I)
      GO TO 30
   10 CONTINUE
      OUT(I)=V1(I)
      IF(T.EQ.T1) GO TO 50
      DEL=T-T1
      IF(DEL.LT.0.0D0) GO TO 50
      V=V1(I)
   30 CONTINUE
      CALL GAUSS(IRAND,ONE,ZERO,GAS)
      ARG=-DEL/TCOR(I)
      PHI=0.0D0
      IF(ARG.GT.-10.0D0) PHI=DEXP(ARG)
      OUT(I)=PHI*V+SSN(I)*DSQRT(1.0D0-PHI*PHI)*GAS
      IF(L.EQ.2) GO TO 50
      VLAST(I)=OUT(I)
   50 CONTINUE
C
      IF(L.EQ.2) GO TO 100
      IF(T.GT.TLAST) T1=TLAST
      IF(T.LT.TLAST) TLAST=T
  100 CONTINUE
      RETURN
      END
